import os

dirname = "E:\\learn\\享学-并发-源码解析-性能优化-分布式-微服务(下)\\"
replacename = "并发 - 源码解析 -  性能优化 - 分布式 - 微服务(下)   享学Ke堂 (P"
files = os.listdir(dirname)

for filename in files:
    if filename.find(replacename) != -1:
        print("原文件名：", filename)
        newname = dirname + filename.replace(replacename, "")
        os.rename(dirname + filename, newname)
